﻿<?php defined('_JEXEC') or die('Restricted access'); ?>

<?php JHTML::_('behavior.tooltip'); ?>

<?php
	$cid = JRequest::getVar( 'cid', array(0) );
	$edit = JRequest::getVar('edit',true);
	$text = intval($edit) ? JText::_( 'Edit' ) : JText::_( 'New' );

	JToolBarHelper::title( 'Maszyny samojezdne' . ': <small><small>[ '. $text .' ]</small></small>' , 'maszyna.png' );
	JToolBarHelper::save();
	JToolBarHelper::cancel();
	JToolBarHelper::help( 'screen.maszynysj.edit' );
?>

<?php
	// clean item data
	JFilterOutput::objectHTMLSafe( $this->maszynasj, ENT_QUOTES, '' );
?>
<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) 
	{
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}

		// do field validation
		if (trim(form.name.value) == "") {
			alert( "Podaj nazwę sprzętu!" );
		} else {
			submitform( pressbutton );
		}
	}
</script>

<form action="index.php" method="post" name="adminForm" autocomplete="off">
	<div class="col">
	<table>
	<tr><td colspan="3" rowspan="4">
		<fieldset class="adminform">
		<legend><?php echo 'Szczegóły maszyny samojezdnej'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="mo1">
							<?php echo 'Nazwa'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mo1" id="mo1" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo1'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo2">
							<?php echo 'Model'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mo2" id="mo2" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo2'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo3">
							<?php echo 'Rok produkcji'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mo3" id="mo3" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo3'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo4">
							<?php echo 'Numer seryjny'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mo4" id="mo4" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo4'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="nri">
							<?php echo 'Numer  inwentaryzacyjny'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="nri" id="nri" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('nri'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo5">
							<?php echo 'Data zakupu'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mo5" id="mo5" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo5'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo6">
							<?php echo 'Numer dokumentu zakupu'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mo6" id="mo6" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo6'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo7">
							<?php echo 'Kwota zakupu netto'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mo7" id="mo7" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo7'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo8">
							<?php echo 'Dodatkowe koszty zakupu netto'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mo8" id="mo8" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo8'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo9">
							<?php echo 'Data przyjęcia do eksploatacji'; ?>
						</label>
					</td>
					<td>
						<input type="text" mo9="mo9" id="mo9" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo9'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo10">
							<?php echo 'Numer OT'; ?>
						</label>
					</td>
					<td>
						<input type="text" mo10="mo10" id="mo10" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo10'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo11">
							<?php echo 'Numer LT'; ?>
						</label>
					</td>
					<td>
						<input type="text" mo11="mo11" id="mo11" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo11'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo12">
							<?php echo 'Końcowa data gwarancji'; ?>
						</label>
					</td>
					<td>
						<input type="text" mo12="mo12" id="mo12" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo12'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo13">
							<?php echo 'Gwarancja MTU'; ?>
						</label>
					</td>
					<td>
						<input type="text" mo13="mo13" id="mo13" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo13'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mo14">
							<?php echo 'Dotacja'; ?>
						</label>
					</td>
					<td>
						<input type="text" mo14="mo14" id="mo14" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mo14'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<td colspan="3">
		<fieldset class="adminform">
		<legend><?php echo 'Wartość maszyny samojezdnej'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="na_dzien">
							<?php echo 'Data'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="na_dzien" id="na_dzien" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('na_dzien'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="wartosc">
							<?php echo 'Wartość'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="wartosc" id="wartosc" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('wartosc'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		</tr>
		<tr>
		<td colspan="3">
		<fieldset class="adminform">
		<legend><?php echo 'Własność maszyny samojezdnej'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="msw1">
							<?php echo 'Typ własności'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msw1" id="msw1" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msw1'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msw2">
							<?php echo 'Numer umowy'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msw2" id="msw2" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msw2'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msw3">
							<?php echo 'Umowa od'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msw3" id="msw3" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msw3'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msw4">
							<?php echo 'Umowa do'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msw4" id="msw4" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msw4'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msw5">
							<?php echo 'Skan umowy'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msw5" id="msw5" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msw5'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msw6">
							<?php echo 'Spółka'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msw6" id="msw6" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msw6'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		</tr>
		<tr>
		<td colspan="3">
		<fieldset class="adminform">
		<legend><?php echo 'Spółka użytkująca'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="spolka">
							<?php echo 'Spółka'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="spolka" id="spolka" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('spolka'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		</tr>
		<tr>
		<td colspan="3">
		<fieldset class="adminform">
		<legend><?php echo 'Przegląd'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="msp1">
							<?php echo 'Data przegladu'; ?>
						</label>
					</td>
					<td>
						<input type="text" msp1="msp1" id="msp1" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msp1'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msp2">
							<?php echo 'Ilość motogodzin'; ?>
						</label>
					</td>
					<td>
						<input type="text" msp2="msp2" id="msp2" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msp2'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msp3">
							<?php echo 'Gwarancyjny'; ?>
						</label>
					</td>
					<td>
						<input type="text" msp3="msp3" id="msp3" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msp3'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msp4">
							<?php echo 'Numer faktury'; ?>
						</label>
					</td>
					<td>
						<input type="text" msp4="msp4" id="msp4" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msp4'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msp5">
							<?php echo 'Skan faktury'; ?>
						</label>
					</td>
					<td>
						<input type="text" msp5="msp5" id="msp5" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msp5'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msp6">
							<?php echo 'Numer raportu serwisowego'; ?>
						</label>
					</td>
					<td>
						<input type="text" msp6="msp6" id="msp6" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msp6'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msp7">
							<?php echo 'Skan raportu'; ?>
						</label>
					</td>
					<td>
						<input type="text" msp7="msp7" id="msp7" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msp7'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msp8">
							<?php echo 'Wartość faktury'; ?>
						</label>
					</td>
					<td>
						<input type="text" msp8="msp8" id="msp8" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msp8'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		</tr>
		<tr>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Serwis'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="mss1">
							<?php echo 'Data naprawy'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mss1" id="mss1" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mss1'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mss2">
							<?php echo 'Numer faktury'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mss2" id="mss2" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mss2'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mss3">
							<?php echo 'Skan faktury'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mss3" id="mss3" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mss3'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mss4">
							<?php echo 'Numer raportu'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mss4" id="mss4" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mss4'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mss5">
							<?php echo 'Skan raportu'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mss5" id="mss5" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mss5'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="mss6">
							<?php echo 'Wartość faktury'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="mss6" id="mss6" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('mss6'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Akumulatory'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="msa1">
							<?php echo 'Data montażu'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msa1" id="msa1" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msa1'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msa2">
							<?php echo 'Typ akumulatora'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msa2" id="msa2" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msa2'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msa3">
							<?php echo 'Typ budowy'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msa3" id="msa3" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msa3'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msa4">
							<?php echo 'Wymiar'; ?>
						</label>
					</td>
					<td>
						<input type="text" msa4="msa4" id="msa4" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msa4'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Prostowniki'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="msr1">
							<?php echo 'Data montażu'; ?>
						</label>
					</td>
					<td>
						<input type="text" msr1="msr1" id="msr1" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msr1'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msr2">
							<?php echo 'Typ prostownika'; ?>
						</label>
					</td>
					<td>
						<input type="text" msr2="msr2" id="msr2" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msr2'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msr3">
							<?php echo 'Typ napięcia prostownika'; ?>
						</label>
					</td>
					<td>
						<input type="text" msr3="msr3" id="msr3" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msr3'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msr4">
							<?php echo 'Symbol'; ?>
						</label>
					</td>
					<td>
						<input type="text" msr4="msr4" id="msr4" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msr4'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msr5">
							<?php echo 'Numer fabryczny'; ?>
						</label>
					</td>
					<td>
						<input type="text" msr5="msr5" id="msr5" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msr5'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Ssawa'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="msd1">
							<?php echo 'Guma przód'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msd1" id="msd1" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msd1'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msd2">
							<?php echo 'Guma tył'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msd2" id="msd2" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msd2'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msd3">
							<?php echo 'Guma specjalna przód'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msd3" id="msd3" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msd3'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msd4">
							<?php echo 'Guma specjalna tył'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msd4" id="msd4" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msd4'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		<td>
		<fieldset class="adminform">
		<legend><?php echo 'Przeniesienie'; ?></legend>
			<table class="admintable" cellspacing="1">
				<tr>
					<td width="150" class="key">
						<label for="msn1">
							<?php echo 'Data zamówienia'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msn1" id="msn1" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msn1'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msn2">
							<?php echo 'Zamawiający'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msn2" id="msn2" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msn2'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msn3">
							<?php echo 'Obiekt wydający'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msn3" id="msn3" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msn3'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msn4">
							<?php echo 'Osoba wydająca'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msn4" id="msn4" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msn4'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msn5">
							<?php echo 'Data wydania'; ?>
						</label>
					</td>
					<td>
						<input type="text" name="msn5" id="msn5" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msn5'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msn6">
							<?php echo 'Obiekt przyjmujący'; ?>
						</label>
					</td>
					<td>
						<input type="text" msn6="msn6" id="msn6" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msn6'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msn7">
							<?php echo 'Osoba przyjmująca'; ?>
						</label>
					</td>
					<td>
						<input type="text" msn7="msn7" id="msn7" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msn7'); ?>" />
					</td>
				</tr>
				<tr>
					<td width="150" class="key">
						<label for="msn8">
							<?php echo 'Data przyjęcia'; ?>
						</label>
					</td>
					<td>
						<input type="text" msn8="msn8" id="msn8" class="inputbox" size="20" maxlength="150" value="<?php echo $this->maszynasj->get('msn8'); ?>" />
					</td>
				</tr>
			</table>
		</fieldset>
		</td>
		</tr>
		</table>
	</div>
	<div class="clr"></div>

	<input type="hidden" name="id" value="<?php echo $this->maszynasj->get('id'); ?>" />
	<input type="hidden" name="cid[]" value="<?php echo $this->maszynasj->get('id'); ?>" />
	<input type="hidden" name="option" value="com_maszynysj" />
	<input type="hidden" name="task" value="" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
